package com.duomai.myapplication.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.duomai.myapplication.R;

public class UserHomeAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public UserHomeAdapter() {
        super(R.layout.item_home);
    }

    @Override
    protected void convert(BaseViewHolder helper, String str) {
        switch (helper.getLayoutPosition()){
            case 0:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu1);
                break;
            case 1:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu2);
                break;
            case 2:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu3);
                break;
            case 3:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu4);
                break;
            case 4:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu5);
                break;
            case 5:
                helper.setImageResource(R.id.ivBac,R.mipmap.tu6);
                break;
        }
        helper.setText(R.id.tvName, str);
    }

}